package com.lebang.service.sys;

import com.lebang.domain.AppMainRefresh;
import com.lebang.entity.RequestHeaders;
import com.lebang.example.AppMainRefreshExample;
import com.lebang.mapper.AppMainRefreshMapper;
import com.lebang.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;

/**
* app_main_refresh
* @Author hwq
* @Date 2020-07-10
*/
@Service
public class AppMainRefreshService extends BaseService<AppMainRefresh,Integer, AppMainRefreshExample>{
    @Autowired
    private AppMainRefreshMapper appMainRefreshMapper;

    public int selectByAppStore(RequestHeaders requestHeaders){
          return Optional.ofNullable(appMainRefreshMapper.selectByAppStore(requestHeaders.getAppStore())).orElse(0);
    }
}
